const app = require("express");
const router = app.Router();
router.get("/login", (req, res) => {
  const { username, password } = req.body;
  if (username === "邓洪浩" && password === "123456") {
    res.send({
      code: 0,
      msg: "登录成功",
      data: {
        token: "admin-token",
      },
    });
  } else {
    res.send({
      code: 1,
      msg: "账号或密码错误",
    });
  }
});
// 导出这个路由
module.exports = router;
